package cn.zzuli.edu.studywebsocket.controller;

import cn.zzuli.edu.studywebsocket.config.WebSocketServer;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date: 2021/3/12 19:12
 * @Author: 绯色下午茶
 * @Description:
 */
@RestController
@RequestMapping("/web")
public class WebSocketController {
    @RequestMapping("/push/{workerId}")
    public String push( @PathVariable("workerId") Integer workerId) throws Exception {
        WebSocketServer.sendInfo("我是你爹",workerId);
        return "MSG SEND OK";
    }
}
